/**
 * Created by chenxiaoyu on 2018/9/13
 * Email 1524904743@qq.com
 */
/*
var newModule= angular.injector(['testModule', 'ng']).invoke(function(game){
    // alert(game.title);
    console.log(11111111111)
});*/
// console.log(newModule);
angular.module('testModule').factory('tooling', [
    function () {
        return {
            sort: function (arr) {
                return arr.sort(function (a, b) {
                    return b - a;
                });
            }
        }
    }
])

angular.module('testModule').controller('testCtrl2', [
    '$scope',
    'tooling',
    function ($scope, tooling) {
        var arr= [2,32,4,21,324,545,23,467,7,47,,9,643,89,543,23,6,56,79,,543,];
        var b= tooling.sort(arr);
        console.log(b, arr);
    }
])


test.controller('testCtrl2', testCtrl2);

function testCtrl2($scope) {
    console.log(2222222);
}

testCtrl2.$inject= ['$scope'];

/*var newModule= angular.injector(['testCtrl2', 'ng']).invoke(function(game){
    // alert(game.title);
    console.log(11111111111)
})*/
